-- GENERATED SPELL FOR [Disembodied Exarch] --


function spell0_21058(pUnit, Event) --@Devotion Aura,Self--
pUnit:FullCastSpellOnTarget(8258,pUnit)
pUnit:RegisterEvent('Sorts_21058', 587, 1)
end

function spell1_21058(pUnit, Event) --@Heal Other,Heal--
pUnit:FullCastSpellOnTarget(33910,pUnit)
pUnit:RegisterEvent('Sorts_21058', 4000, 1)
end

function spell2_21058(pUnit, Event) --@Power Word: Fortitude,n/a--
pUnit:FullCastSpellOnTarget(36004,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21058', 2000, 1)
end

function Sorts_21058(pUnit, Event)
local choix_sorts_21058 = math.random(0, 2)
if choix_sorts_21058 == 0 then
pUnit:RegisterEvent('spell0_21058', 1, 1)
end
if choix_sorts_21058 == 1 then
pUnit:RegisterEvent('spell1_21058', 1, 1)
end
if choix_sorts_21058 == 2 then
pUnit:RegisterEvent('spell2_21058', 1, 1)
end
end

function mob21058_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21058', math.random(1500, 3000), 1)
end

function mob21058_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21058_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21058_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21058, 1, 'mob21058_Action')
RegisterUnitEvent(21058, 2, 'mob21058_Leave')
RegisterUnitEvent(21058, 3, 'mob21058_Kill')
RegisterUnitEvent(21058, 4, 'mob21058_Die')
